cmake_minimum_required(VERSION 3.5)
# AVProcessor
project(AVProcessor)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# 头文件路径
set(
    INC_DIR
    "/usr/local/include" 
    "./BSW_pack/decode_handler/include"
    "./BSW_pack/encode_handler/include"
    "./BSW_pack/mux_handler/include"
    "./BSW_pack/demux_handler/include"
    "./BSW_pack/common/include"
    "./logic_manager/include"
)

# 库文件路径
set(LIB_DIR "/usr/local/lib")
# 搜索所有源文件
file(GLOB SOURCE 
    "./BSW_pack/decode_handler/src/*.cpp"
    "./BSW_pack/encode_handler/src/*.cpp"
    "./BSW_pack/mux_handler/src/*.cpp"
    "./BSW_pack/demux_handler/src/*.cpp"
    "./BSW_pack/common/src/*.cpp"
    "./logic_manager/src/*.cpp"
    )


add_executable(
    ${PROJECT_NAME}
    "main.cpp"
    ${SOURCE}
)

target_include_directories(
    ${PROJECT_NAME}
    PUBLIC
    ${INC_DIR}
)

target_link_libraries(
    ${PROJECT_NAME}
    PUBLIC
    ${LIB_DIR}/libavcodec.a
    ${LIB_DIR}/libavformat.a
    ${LIB_DIR}/libavutil.a
    ${LIB_DIR}/libswresample.a
    ${LIB_DIR}/libswscale.a 
    ${LIB_DIR}/libavutil.a 
    ${LIB_DIR}/libSDL2.a
    pthread
)
